<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script type="text/javascript" src="/login/js/jquery-1.4.2.min.js"></script>
	<title>江北区行政执法系统</title>
<style type="text/css">
<!--
body {
	margin: 0px;
	padding: 0px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
#container {
	height: 600px;
	width: 1000px;
	margin-top: 50px;
	margin-right: auto;
	margin-left: auto;
	overflow: hidden;
}
#container .topimg {
	background-image: url(/login/xzzf/images/log1-bg.jpg);
	background-repeat: no-repeat;
	height: 221px;
	width: 1000px;
}
#container .middleimg {
	height: 170px;
	width: 1000px;
}
.middleimg ul {
	margin: 0px;
	padding: 0px;
}

.middleimg ul li {
	list-style-type: none;
	float: left;
	display:block;
}
.middleimg .leftimg {
	background-image: url(/login/xzzf/images/log2-bg.jpg);
	background-repeat: no-repeat;
	height: 171px;
	width: 362px;
}
.middleimg .centerimg {
	background-image: url(/login/xzzf/images/log3-bg.jpg);
	background-repeat: no-repeat;
	height: 171px;
	width: 436px;
}
.middleimg .rightimg {
	background-image: url(/login/xzzf/images/log4-bg.jpg);
	background-repeat: no-repeat;
	height: 171px;
	width:202px;
}
#container .bottomimg {
	background-image: url(/login/xzzf/images/log5-bg.jpg);
	background-repeat: no-repeat;
	height: 208px;
	width: 1000px;
}
.centerimg div {
	height: 120px;
	width: 320px;
	margin-right: auto;
	margin-left: auto;
	margin-top: 40px;
}

.centerimg table{
	height: 120px;
	width: 320px;
}

.centerimg div table tr td a img {
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
}
-->
</style>

<script type="text/javascript">
if(window.opener)
{
	//alert(window.opener);
	window.opener.location = self.location;
	//window.opener.focus();
	window.close();
}

//_top框架显示方法
if(top.location != self.location)
{
	top.location = self.location;
}

function checkLogin(){
	if(isValid("username","用户名") && isValid("password","密码")){
		return true;
	}
	return false;
}

jQuery(function(){
	jQuery("#username").focus();
});

</script>

</head>

<body>
<div id="container">
  <div class="topimg"></div>
  <div class="middleimg">
    <ul>
      <li class="leftimg"></li>
      <li class="centerimg">
        <div>
        	<form action="<%=basePath%>app/login!login" method="post" id="loginForm" onsubmit="return checkLogin();">
        	<input type="hidden" name="systemType" value="xzzf"/>
          <table width="320" height="118" border="0">
            <tr>
                <td width="89" align="center">用户名：</td>
                <td width="221"><label>
                  <s:textfield name="username" id="username" cssClass="txt" cssStyle="width: 160px;"/>
                </label></td>
            </tr>
              <tr>
                <td align="center">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
                <td>
					<s:password name="password" id="password" cssClass="txt" cssStyle="width: 160px;"/>
				</td>
              </tr>
              <tr>
				<th colspan="2" style="font-size: 12px;color:red;"><s:actionerror/></th>
			  </tr>
              <tr>
                <td colspan="2" align="center">
                	<a href="#" id="subButt">
                		<img src="/login/xzzf/images/login1-bt.jpg" width="88" height="23" />
                	</a>&nbsp;&nbsp;&nbsp;&nbsp;
                	<a href="#" id="resButt">
                		<img src="/login/xzzf/images/login2-bt.jpg" width="88" height="23" />
                	</a>
                </td>
              </tr>
          </table>
          </form>
        </div>
      </li>
      <li class="rightimg"></li>
    </ul>
  </div>
  <div class="bottomimg"></div>
</div>

<script type="text/javascript">
	$("#subButt").click(function(){
		$("#loginForm").submit();
	});
	
	$("#resButt").click(function(){
		document.getElementById("loginForm").reset();
	});
	
	// 绑定回车事件
	$('input').bind('keyup', function(event){   
		if(event.keyCode == 13){
			$('#loginForm').submit()   
        }   
    });
</script>

</body>
</html>
